﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Platform.ObjectModel.Validation
{

	//public class ValidationResult : DataObjectFlake
	//{
	//	public ValidationResult()
	//	{
	//		this.Errors = new List<ValidationMessage>();
	//	}

	//	public bool IsValid
	//	{
	//		get { return !this.Errors.Any(); }
	//	}

	//	public List<ValidationMessage> Errors
	//	{
	//		get;
	//		private set;
	//	}
	//}


	public class ValidationResult : DataObjectFlake
	{

		public ValidationResult()
		{
			this.Errors = new List<ValidationException>();
			this.Warnings = new List<string>();
		}

		public bool IsValid
		{
			get { return !this.Errors.Any(); }
		}

		public List<ValidationException> Errors
		{ get; private set; }

		public List<string> Warnings
		{ get; private set; }
	}

}
